﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using ERP_RORZE_PERMISSION.Base;
using ERP_RORZE_PRODUCT.Product.BasicList;
using ERP_RORZE_SYSTEM;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ERP_RORZE_TOOL.Tool.UserControls;
//using ERP_RORZE_PRODUCT.Product.BasicList;
using ERP_RORZE_TOOL.Tool;

namespace ERP_RORZE_DLL.BasicList
{
    public partial class BasicListPanel : UserControl
    {
        private bool bankaccountLoad;
        private bool countryLoad;
        private bool compLoad;
        private bool koseiLoad;
        private bool makerLoad;
        private bool partLoad;
        private bool unitexchangeLoad;
        private bool partclassLoad;
        private bool staffLoad;
        private bool supplierLoad;
        private bool currencyLoad;
        private bool customerLoad;
        private bool deliverytermLoad;
        private bool exchangerateLoad;
        private bool groupLoad;
        private bool iqLoad;
        private bool paymentLoad;
        private bool shiptoLoad;
        private bool transportLoad;
        private bool unitLoad;

        //tool cutting
        private bool frequency;
        private bool maker333;
        private bool mistake;
        private bool processStatus;
        private bool rotate;
        private bool supplier333;
        private bool toolGroups;
        private bool tools;
        private bool toolStatus;
        private bool kind;
        private bool rate;

        //product
        private bool expence;
        private bool work;
        private bool jig;
        private bool option;

        //Assembly
        private bool assworkLoad;
        private bool assmistakereasonkLoad;
        private bool assmistakeLoad;

        private panel_BankAccount panel_BankAccount;
        private panel_Country panel_Country;
        private panel_Comp panel_Comp;
        private panel_Currency panel_Currency;
        private panel_Customer panel_Customer;
        private panel_DeliveryTerm panel_DeliveryTerm;
        private panel_ExchangeRate panel_ExchangeRate;
        private panel_Group panel_Group;
        private panel_IQ panel_IQ;
        private panel_Payment panel_Payment;
        private panel_ShipTo panel_ShipTo;
        private panel_Transport panel_Transport;
        private panel_Unit panel_Unit;
        private panel_Kosei panel_Kosei;
        private panel_Part panel_Part;
        private panel_UnitExchange panel_UnitExchange;
        private panel_PartClass panel_PartClass;
        private panel_Staff panel_Staff;
        private panel_Supplier panel_Supplier;
        private panel_Maker panel_Maker;

        
        private ctrlExpence ctrlExpence;
        private ctrlJig ctrlJig;
        private ctrlWork ctrlWork;
        private ctrlOption ctrlOption; 

        //Tool cutting
        private ucFrequency panel_Frequency;
        private ucMistake panel_Mistake;
        private ucProcessStatus panel_ProcessStatus;
        private ucRotate panel_Rotate;
        private ucToolGroup panel_ToolGroup;
        private ucTool panel_Tool;
        private ucToolStatus panel_ToolStatus;
        private ucKind panel_Kind;
        private ucExchangeRate panel_Rate;
        private ucMaker panel_Maker333;
        private ucSupplier panel_Supplier333;

        //Assembly
        private panel_AssWork panel_AssWork;
        private panel_AssMistakeReason panel_AssMistakeReason;
        private panel_AssMistake panel_AssMistake;

        public BasicListPanel()
        {
            InitializeComponent();

            bankaccountLoad = false;
            countryLoad = false;
            compLoad = false;
            koseiLoad = false;
            partLoad = false;
            unitexchangeLoad = false;
            partclassLoad = false;
            staffLoad = false;
            supplierLoad = false;
            currencyLoad = false;
            deliverytermLoad = false;
            exchangerateLoad = false;
            groupLoad = false;
            iqLoad = false;
            paymentLoad = false;
            shiptoLoad = false;
            transportLoad = false;
            unitLoad = false;

            //Tool cutting
            frequency = false;
            mistake = false;
            processStatus = false;
            rotate = false;
            toolGroups = false;
            tools = false;
            toolStatus = false;
            kind = false;
            rate = false;
            maker333 = false;
            supplier333 = false;

            //Assembly
            assworkLoad = false;
            assmistakeLoad = false;
            assmistakereasonkLoad = false;
        }

        void navBarControl_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            switch (e.Link.Item.Name)
            {
                case "navBankAccount":
                    if (!bankaccountLoad)
                    {
                        this.panel_BankAccount = new ERP_RORZE_DLL.BasicList.panel_BankAccount();
                        bankaccountLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_BankAccount);
                    // 
                    // panel_BankAccount
                    // 
                    this.panel_BankAccount.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_BankAccount.Location = new System.Drawing.Point(2, 2);
                    this.panel_BankAccount.Name = "panel_BankAccount";
                    this.panel_BankAccount.Size = new System.Drawing.Size(588, 410);
                    this.panel_BankAccount.TabIndex = 0;
                    break;
                case "navCountry":
                    if (!countryLoad)
                    {
                        this.panel_Country = new ERP_RORZE_DLL.BasicList.panel_Country();
                        countryLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Country);
                    // 
                    // panel_Country
                    // 
                    this.panel_Country.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Country.Location = new System.Drawing.Point(2, 2);
                    this.panel_Country.Name = "panel_Country";
                    this.panel_Country.Size = new System.Drawing.Size(588, 410);
                    this.panel_Country.TabIndex = 0;
                    break;
                case "navComp":
                    if (!compLoad)
                    {
                        this.panel_Comp = new ERP_RORZE_DLL.BasicList.panel_Comp();
                        compLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Comp);
                    // 
                    // panel_Comp
                    // 
                    this.panel_Comp.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Comp.Location = new System.Drawing.Point(2, 2);
                    this.panel_Comp.Name = "panel_Comp";
                    this.panel_Comp.Size = new System.Drawing.Size(588, 410);
                    this.panel_Comp.TabIndex = 0;
                    break;
                case "navKosei":
                    if (!koseiLoad)
                    {
                        this.panel_Kosei = new ERP_RORZE_DLL.BasicList.panel_Kosei();
                        koseiLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Kosei);
                    // 
                    // panel_Kosei
                    // 
                    this.panel_Kosei.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Kosei.Location = new System.Drawing.Point(2, 2);
                    this.panel_Kosei.Name = "panel_Kosei";
                    this.panel_Kosei.Size = new System.Drawing.Size(588, 410);
                    this.panel_Kosei.TabIndex = 0;
                    break;
                case "navMaker":
                    if (!makerLoad)
                    {
                        this.panel_Maker = new ERP_RORZE_DLL.BasicList.panel_Maker();
                        makerLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Maker);
                    // 
                    // panel_Kosei
                    // 
                    this.panel_Maker.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Maker.Location = new System.Drawing.Point(2, 2);
                    this.panel_Maker.Name = "panel_Maker";
                    this.panel_Maker.Size = new System.Drawing.Size(588, 410);
                    this.panel_Maker.TabIndex = 0;
                    break;
                case "navPart":
                    if (!partLoad)
                    {
                        this.panel_Part = new ERP_RORZE_DLL.BasicList.panel_Part();
                        partLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Part);
                    // 
                    // panel_Part
                    // 
                    this.panel_Part.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Part.Location = new System.Drawing.Point(2, 2);
                    this.panel_Part.Name = "panel_Part";
                    this.panel_Part.Size = new System.Drawing.Size(588, 410);
                    this.panel_Part.TabIndex = 0;
                    break;
                case "navUnitExchange":
                    if (!unitexchangeLoad)
                    {
                        this.panel_UnitExchange = new ERP_RORZE_DLL.BasicList.panel_UnitExchange();
                        unitexchangeLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_UnitExchange);
                    // 
                    // panel_UnitExchange
                    // 
                    this.panel_UnitExchange.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_UnitExchange.Location = new System.Drawing.Point(2, 2);
                    this.panel_UnitExchange.Name = "panel_UnitExchange";
                    this.panel_UnitExchange.Size = new System.Drawing.Size(588, 410);
                    this.panel_UnitExchange.TabIndex = 0;
                    break;
                case "navPartClass":
                    if (!partclassLoad)
                    {
                        this.panel_PartClass = new ERP_RORZE_DLL.BasicList.panel_PartClass();
                        partclassLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_PartClass);
                    // 
                    // panel_Part
                    // 
                    this.panel_PartClass.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_PartClass.Location = new System.Drawing.Point(2, 2);
                    this.panel_PartClass.Name = "panel_PartClass";
                    this.panel_PartClass.Size = new System.Drawing.Size(588, 410);
                    this.panel_PartClass.TabIndex = 0;
                    break;
                case "navStaff":
                    if (!staffLoad)
                    {
                        this.panel_Staff = new ERP_RORZE_DLL.BasicList.panel_Staff();
                        staffLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Staff);
                    // 
                    // panel_Staff
                    // 
                    this.panel_Staff.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Staff.Location = new System.Drawing.Point(2, 2);
                    this.panel_Staff.Name = "panel_Part";
                    this.panel_Staff.Size = new System.Drawing.Size(588, 410);
                    this.panel_Staff.TabIndex = 0;
                    break;
                case "navSupplier":
                    if (!supplierLoad)
                    {
                        this.panel_Supplier = new ERP_RORZE_DLL.BasicList.panel_Supplier();
                        supplierLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Supplier);
                    // 
                    // panel_Supplier
                    // 
                    this.panel_Supplier.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Supplier.Location = new System.Drawing.Point(2, 2);
                    this.panel_Supplier.Name = "panel_Supplier";
                    this.panel_Supplier.Size = new System.Drawing.Size(588, 410);
                    this.panel_Supplier.TabIndex = 0;
                    break;
                case "navCurrency":
                    if (!currencyLoad)
                    {
                        this.panel_Currency = new ERP_RORZE_DLL.BasicList.panel_Currency();
                        currencyLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Currency);
                    // 
                    // panel_Currency
                    // 
                    this.panel_Currency.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Currency.Location = new System.Drawing.Point(2, 2);
                    this.panel_Currency.Name = "panel_Currency";
                    this.panel_Currency.Size = new System.Drawing.Size(588, 410);
                    this.panel_Currency.TabIndex = 0;
                    break;
                case "navCustomer":
                    if (!customerLoad)
                    {
                        this.panel_Customer = new ERP_RORZE_DLL.BasicList.panel_Customer();
                        customerLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Customer);
                    // 
                    // panel_Customer
                    // 
                    this.panel_Customer.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Customer.Location = new System.Drawing.Point(2, 2);
                    this.panel_Customer.Name = "panel_Customer";
                    this.panel_Customer.Size = new System.Drawing.Size(588, 410);
                    this.panel_Customer.TabIndex = 0;
                    break;
                case "navDeliveryTerm":
                    if (!deliverytermLoad)
                    {
                        this.panel_DeliveryTerm = new ERP_RORZE_DLL.BasicList.panel_DeliveryTerm();
                        deliverytermLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_DeliveryTerm);
                    // 
                    // panel_DeliveryTerm
                    // 
                    this.panel_DeliveryTerm.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_DeliveryTerm.Location = new System.Drawing.Point(2, 2);
                    this.panel_DeliveryTerm.Name = "panel_DeliveryTerm";
                    this.panel_DeliveryTerm.Size = new System.Drawing.Size(588, 410);
                    this.panel_DeliveryTerm.TabIndex = 0;
                    break;
                case "navExchangeRate":
                    if (!exchangerateLoad)
                    {
                        this.panel_ExchangeRate = new ERP_RORZE_DLL.BasicList.panel_ExchangeRate();
                        exchangerateLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ExchangeRate);
                    // 
                    // panel_ExchangeRate
                    // 
                    this.panel_ExchangeRate.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ExchangeRate.Location = new System.Drawing.Point(2, 2);
                    this.panel_ExchangeRate.Name = "panel_ExchangeRate";
                    this.panel_ExchangeRate.Size = new System.Drawing.Size(588, 410);
                    this.panel_ExchangeRate.TabIndex = 0;
                    break;
                case "navGroup":
                    if (!groupLoad)
                    {
                        this.panel_Group = new ERP_RORZE_DLL.BasicList.panel_Group();
                        groupLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Group);
                    // 
                    // panel_Group
                    // 
                    this.panel_Group.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Group.Location = new System.Drawing.Point(2, 2);
                    this.panel_Group.Name = "panel_Group";
                    this.panel_Group.Size = new System.Drawing.Size(588, 410);
                    this.panel_Group.TabIndex = 0;
                    break;
                case "navIQ":
                    if (!iqLoad)
                    {
                        this.panel_IQ = new ERP_RORZE_DLL.BasicList.panel_IQ();
                        iqLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_IQ);
                    // 
                    // panel_Group
                    // 
                    this.panel_IQ.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_IQ.Location = new System.Drawing.Point(2, 2);
                    this.panel_IQ.Name = "panel_IQ";
                    this.panel_IQ.Size = new System.Drawing.Size(588, 410);
                    this.panel_IQ.TabIndex = 0;
                    break;
                case "navPayment":
                    if (!paymentLoad)
                    {
                        this.panel_Payment = new ERP_RORZE_DLL.BasicList.panel_Payment();
                        paymentLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Payment);
                    // 
                    // panel_Payment
                    // 
                    this.panel_Payment.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Payment.Location = new System.Drawing.Point(2, 2);
                    this.panel_Payment.Name = "panel_Payment";
                    this.panel_Payment.Size = new System.Drawing.Size(588, 410);
                    this.panel_Payment.TabIndex = 0;
                    break;
                case "navShipTo":
                    if (!shiptoLoad)
                    {
                        this.panel_ShipTo = new ERP_RORZE_DLL.BasicList.panel_ShipTo();
                        shiptoLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ShipTo);
                    // 
                    // panel_ShipTo
                    // 
                    this.panel_ShipTo.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ShipTo.Location = new System.Drawing.Point(2, 2);
                    this.panel_ShipTo.Name = "panel_ShipTo";
                    this.panel_ShipTo.Size = new System.Drawing.Size(588, 410);
                    this.panel_ShipTo.TabIndex = 0;
                    break;
                case "navTransport":
                    if (!transportLoad)
                    {
                        this.panel_Transport = new ERP_RORZE_DLL.BasicList.panel_Transport();
                        transportLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Transport);
                    // 
                    // panel_Transport
                    // 
                    this.panel_Transport.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Transport.Location = new System.Drawing.Point(2, 2);
                    this.panel_Transport.Name = "panel_Transport";
                    this.panel_Transport.Size = new System.Drawing.Size(588, 410);
                    this.panel_Transport.TabIndex = 0;
                    break;
                case "navUnit":
                    if (!unitLoad)
                    {
                        this.panel_Unit = new ERP_RORZE_DLL.BasicList.panel_Unit();
                        unitLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Unit);
                    // 
                    // panel_Unit
                    // 
                    this.panel_Unit.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Unit.Location = new System.Drawing.Point(2, 2);
                    this.panel_Unit.Name = "panel_Unit";
                    this.panel_Unit.Size = new System.Drawing.Size(588, 410);
                    this.panel_Unit.TabIndex = 0;
                    break;

                ///////////////////////////////
                //////////////Tool cutting
                //////////////////////////////////
                case "navFrequency":
                    if (!frequency)
                    {
                        this.panel_Frequency = new ERP_RORZE_TOOL.Tool.UserControls.ucFrequency();
                        frequency = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Frequency);
                    // 
                    // panel_Frequency
                    // 
                    this.panel_Frequency.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Frequency.Location = new System.Drawing.Point(2, 2);
                    this.panel_Frequency.Name = "panel_Frequency";
                    this.panel_Frequency.Size = new System.Drawing.Size(588, 410);
                    this.panel_Frequency.TabIndex = 0;
                    break;
                case "navMistake":
                    if (!mistake)
                    {
                        this.panel_Mistake = new ERP_RORZE_TOOL.Tool.UserControls.ucMistake();
                        mistake = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Mistake);
                    // 
                    // panel_Mistake
                    // 
                    this.panel_Mistake.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Mistake.Location = new System.Drawing.Point(2, 2);
                    this.panel_Mistake.Name = "panel_Mistake";
                    this.panel_Mistake.Size = new System.Drawing.Size(588, 410);
                    this.panel_Mistake.TabIndex = 0;
                    break;
                case "navMaker333":
                    if (!maker333)
                    {
                        this.panel_Maker333 = new ERP_RORZE_TOOL.Tool.UserControls.ucMaker();
                        maker333 = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Maker333);
                    // 
                    // panel_Mistake
                    // 
                    this.panel_Maker333.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Maker333.Location = new System.Drawing.Point(2, 2);
                    this.panel_Maker333.Name = "panel_Maker333";
                    this.panel_Maker333.Size = new System.Drawing.Size(588, 410);
                    this.panel_Maker333.TabIndex = 0;
                    break;
                case "navSupplier333":
                    if (!supplier333)
                    {
                        this.panel_Supplier333 = new ERP_RORZE_TOOL.Tool.UserControls.ucSupplier();
                        supplier333 = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Supplier333);
                    // 
                    // panel_Mistake
                    // 
                    this.panel_Supplier333.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Supplier333.Location = new System.Drawing.Point(2, 2);
                    this.panel_Supplier333.Name = "panel_Supplier333";
                    this.panel_Supplier333.Size = new System.Drawing.Size(588, 410);
                    this.panel_Supplier333.TabIndex = 0;
                    break;
                case "navProcessStatus":
                    if (!processStatus)
                    {
                        this.panel_ProcessStatus = new ERP_RORZE_TOOL.Tool.UserControls.ucProcessStatus();
                        processStatus = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ProcessStatus);
                    // 
                    // panel_ProcessStatus
                    // 
                    this.panel_ProcessStatus.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ProcessStatus.Location = new System.Drawing.Point(2, 2);
                    this.panel_ProcessStatus.Name = "panel_ProcessStatus";
                    this.panel_ProcessStatus.Size = new System.Drawing.Size(588, 410);
                    this.panel_ProcessStatus.TabIndex = 0;
                    break;
                case "navRotate":
                    if (!rotate)
                    {
                        this.panel_Rotate = new ERP_RORZE_TOOL.Tool.UserControls.ucRotate();
                        rotate = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Rotate);
                    // 
                    // panel_Rotate
                    // 
                    this.panel_Rotate.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Rotate.Location = new System.Drawing.Point(2, 2);
                    this.panel_Rotate.Name = "panel_Rotate";
                    this.panel_Rotate.Size = new System.Drawing.Size(588, 410);
                    this.panel_Rotate.TabIndex = 0;
                    break;
                case "navToolGroup":
                    if (!toolGroups)
                    {
                        this.panel_ToolGroup = new ERP_RORZE_TOOL.Tool.UserControls.ucToolGroup();
                        toolGroups = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ToolGroup);
                    // 
                    // panel_Frequency
                    // 
                    this.panel_ToolGroup.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ToolGroup.Location = new System.Drawing.Point(2, 2);
                    this.panel_ToolGroup.Name = "panel_ToolGroup";
                    this.panel_ToolGroup.Size = new System.Drawing.Size(588, 410);
                    this.panel_ToolGroup.TabIndex = 0;
                    break;
                case "navTool":
                    if (!tools)
                    {
                        this.panel_Tool = new ERP_RORZE_TOOL.Tool.UserControls.ucTool();
                        tools = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Tool);
                    // 
                    // panel_Tool
                    // 
                    this.panel_Tool.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Tool.Location = new System.Drawing.Point(2, 2);
                    this.panel_Tool.Name = "panel_Tool";
                    this.panel_Tool.Size = new System.Drawing.Size(588, 410);
                    this.panel_Tool.TabIndex = 0;
                    break;
                case "navToolStatus":
                    if (!toolStatus)
                    {
                        this.panel_ToolStatus = new ERP_RORZE_TOOL.Tool.UserControls.ucToolStatus();
                        toolStatus = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ToolStatus);
                    // 
                    // panel_ToolStatus
                    // 
                    this.panel_ToolStatus.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ToolStatus.Location = new System.Drawing.Point(2, 2);
                    this.panel_ToolStatus.Name = "panel_ToolStatus";
                    this.panel_ToolStatus.Size = new System.Drawing.Size(588, 410);
                    this.panel_ToolStatus.TabIndex = 0;
                    break;
                case "navKind":
                    if (!kind)
                    {
                        this.panel_Kind = new ERP_RORZE_TOOL.Tool.UserControls.ucKind();
                        kind = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Kind);
                    // 
                    // panel_Kind
                    // 
                    this.panel_Kind.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Kind.Location = new System.Drawing.Point(2, 2);
                    this.panel_Kind.Name = "panel_Kind";
                    this.panel_Kind.Size = new System.Drawing.Size(588, 410);
                    this.panel_Kind.TabIndex = 0;
                    break;
                case "navRate":
                    if (!rate)
                    {
                        this.panel_Rate = new ERP_RORZE_TOOL.Tool.UserControls.ucExchangeRate();
                        rate = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Rate);
                    // 
                    // panel_Rate
                    // 
                    this.panel_Rate.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Rate.Location = new System.Drawing.Point(2, 2);
                    this.panel_Rate.Name = "panel_Rate";
                    this.panel_Rate.Size = new System.Drawing.Size(588, 410);
                    this.panel_Rate.TabIndex = 0;
                    break;

                 //end tool
                case "navWork":
                    if (!work)
                    {
                        this.ctrlWork = new ERP_RORZE_PRODUCT.Product.BasicList.ctrlWork();
                        work = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.ctrlWork);
                    // 
                    // panel_Work
                    // 
                    this.ctrlWork.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.ctrlWork.Location = new System.Drawing.Point(2, 2);
                    this.ctrlWork.Name = "Work";
                    this.ctrlWork.Size = new System.Drawing.Size(588, 410);
                    this.ctrlWork.TabIndex = 0;
                    break;

                case "navJigs":
                    if (!jig)
                    {
                        this.ctrlJig = new ERP_RORZE_PRODUCT.Product.BasicList.ctrlJig();
                        jig = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.ctrlJig);
                    // 
                    // panel_Jig
                    // 
                    this.ctrlJig.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.ctrlJig.Location = new System.Drawing.Point(2, 2);
                    this.ctrlJig.Name = "navJigs";
                    this.ctrlJig.Size = new System.Drawing.Size(588, 410);
                    this.ctrlJig.TabIndex = 0;
                    break;
                case "navExpence":
                    if (!expence)
                    {
                        this.ctrlExpence = new ERP_RORZE_PRODUCT.Product.BasicList.ctrlExpence();
                        expence = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.ctrlExpence);
                    // 
                    // panel_Expence
                    // 
                    this.ctrlExpence.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.ctrlExpence.Location = new System.Drawing.Point(2, 2);
                    this.ctrlExpence.Name = "navExpence";
                    this.ctrlExpence.Size = new System.Drawing.Size(588, 410);
                    this.ctrlExpence.TabIndex = 0;
                    break;
                case "navOption":
                    if (!option)
                    {
                        this.ctrlOption = new ERP_RORZE_PRODUCT.Product.BasicList.ctrlOption();
                        option = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.ctrlOption);
                    // 
                    // ctrlOption
                    // 
                    this.ctrlOption.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.ctrlOption.Location = new System.Drawing.Point(2, 2);
                    this.ctrlOption.Name = "navOption";
                    this.ctrlOption.Size = new System.Drawing.Size(588, 410);
                    this.ctrlOption.TabIndex = 0;
                    break; 

                case "navAssWork":
                    if (!assworkLoad)
                    {
                        this.panel_AssWork = new ERP_RORZE_DLL.BasicList.panel_AssWork();
                        assworkLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_AssWork);
                    // 
                    // panel_AssWork
                    // 
                    this.panel_AssWork.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_AssWork.Location = new System.Drawing.Point(2, 2);
                    this.panel_AssWork.Name = "panel_AssWork";
                    this.panel_AssWork.Size = new System.Drawing.Size(588, 410);
                    this.panel_AssWork.TabIndex = 0;
                    break;

                case "navAssMistakeReason":
                    if (!assmistakereasonkLoad)
                    {
                        this.panel_AssMistakeReason = new ERP_RORZE_DLL.BasicList.panel_AssMistakeReason();
                        assmistakereasonkLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_AssMistakeReason);
                    // 
                    // panel_AssMistakeReason
                    // 
                    this.panel_AssMistakeReason.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_AssMistakeReason.Location = new System.Drawing.Point(2, 2);
                    this.panel_AssMistakeReason.Name = "panel_AssMistakeReason";
                    this.panel_AssMistakeReason.Size = new System.Drawing.Size(588, 410);
                    this.panel_AssMistakeReason.TabIndex = 0;
                    break;

                case "navAssMistake":
                    if (!assmistakeLoad)
                    {
                        this.panel_AssMistake = new ERP_RORZE_DLL.BasicList.panel_AssMistake();
                        assmistakeLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_AssMistake);
                    // 
                    // panel_AssMistake
                    // 
                    this.panel_AssMistake.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_AssMistake.Location = new System.Drawing.Point(2, 2);
                    this.panel_AssMistake.Name = "panel_AssMistake";
                    this.panel_AssMistake.Size = new System.Drawing.Size(588, 410);
                    this.panel_AssMistake.TabIndex = 0;
                    break;

                default:
                    this.panelRight.Controls.Clear();
                    break;


            }
        }


        //////////////////////////
        /// Load control to right panel
        //////////////////////////

        public void LoadControl(DevExpress.XtraEditors.XtraUserControl userControl)
        {
            this.panelRight.Controls.Clear();
            this.panelRight.Controls.Add(userControl);
            userControl.Dock = DockStyle.Fill;
        }

    }


    ///////////////////////////////////////////
    /// Class for Create ComboBox Item
    ///////////////////////////////////////////
    public class ComboboxItem
    {
        public string Text { get; set; }
        public object Value { get; set; }

        public override string ToString()
        {
            return Text;
        }
    }

    
}
